You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support links for Ukraine in Russian language - #910
Replace the support links with links to support Ukraine when using Russian language.
Summary by CodeRabbit
Russian (ru-RU) users now see support-Ukraine text and links instead of the Ko-fi support text and link.
Get-SupportLinkUrl returns the Ukraine support URL when the active language is ru-RU. For other languages, it returns the Ko-fi URL.
Set-SupportLinkIcon draws a blue-and-yellow Ukrainian flag as the support-link icon for ru-RU. For other languages, it shows the support-heart glyph and clears the flag-specific size and background.
Update-WindowLanguageResources sets the support-link icon after it updates language resources.
The Ko-fi button in the main window, the About dialog, and the Apply modal use Get-SupportLinkUrl instead of a fixed Ko-fi URL. The Apply modal keeps its error-state behavior and still opens the GitHub issue form.
Config/Languages/ru-RU/Chrome.json changes the support-creator label and Ko-fi link text to "Support Ukraine." The donation message asks users to support Ukraine. The default and ready completion messages mention Russia's aggression against Ukraine and link to support Ukraine.
XAML updates:
Schemas/ApplyChangesWindow.xaml names the support-creator icon TextBlockApplyKofiIcon. Its appearance does not change.
Schemas/MainWindow.xaml places the KofiBtn icon in a named TextBlock instead of the button Content. The tooltip, accessibility name, font size, style, and hit testing do not change.
ConvertTo-LocalizedXaml encodes carriage returns and line feeds as 
 and 
 after XML escaping.
Tests: a new ConvertTo-LocalizedXaml test checks that text with an ampersand and a blank-line paragraph break survives XML attribute parsing with LF and CRLF line endings.
New functions: Get-SupportLinkUrl() and Set-SupportLinkIcon(Icon), both in Scripts/GUI/MainWindow-Localization.ps1.
No actionable comments were generated in the recent review.
Walkthrough
Russian Chrome resources now refer to supporting Ukraine. The main window, About dialog, and apply modal use language-dependent support icons and URLs. The localization converter encodes line breaks in translated values, with tests for LF and CRLF inputs.
Changes: Language-dependent support links
Layer / File(s)
Summary
Select support icon and URL Schemas/MainWindow.xaml, Schemas/ApplyChangesWindow.xaml, Scripts/GUI/MainWindow-Localization.ps1
The XAML names support icon elements. Localization helpers select the icon and support URL based on the active language.
Wire support links into UI surfaces Scripts/GUI/Show-AboutDialog.ps1, Scripts/GUI/Show-ApplyModal.ps1, Scripts/GUI/Show-MainWindow.ps1, Config/Languages/ru-RU/Chrome.json
The main window, About dialog, and apply modal use the language-dependent support URL and icon. Russian resources update support labels and completion messages to refer to Ukraine.
Localized XAML line breaks
Layer / File(s)
Summary
Encode and validate translated line breaks Scripts/FileIO/Import-LanguageFile.ps1, Tests/Import-LanguageFile.Tests.ps1
The converter encodes carriage returns and line feeds after XML escaping. Tests check that LF and CRLF paragraph breaks parse back to the original text.
sequenceDiagram
participant User
participant SupportLinkHandler
participant GetSupportLinkUrl
participant Shell
User->>SupportLinkHandler: Click support link
SupportLinkHandler->>GetSupportLinkUrl: Request URL for active language
GetSupportLinkUrl-->>SupportLinkHandler: Return Ukraine URL for ru-RU or Ko-fi URL otherwise
SupportLinkHandler->>Shell: Open returned URL
Loading
Suggested reviewers:wang13zhe
Merge Risk: Minimal · up to 2451d
This change shows Ukraine support links and icons when Russian is selected, and keeps line breaks in translated text. No concrete merge-blocking risk was found in the changed code.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "Add support links for Ukraine in Russian language" matches the main change. The PR replaces the Ko-fi support links shown under Russian with Ukraine support links. It covers the About dialo…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Powershell Docstrings
The PR adds two PowerShell functions and changes several others. Each added or changed function has a comment-based docstring, and the docstrings match the code. Added functions (Scripts/GUI/MainWindo…
Full details: Title check
Explanation
The title "Add support links for Ukraine in Russian language" matches the main change. The PR replaces the Ko-fi support links shown under Russian with Ukraine support links. It covers the About dialog, the apply modal, the main window button, and the Russian localization strings. The title is 49 characters, which fits the concise-title requirement.
Full details: Powershell Docstrings
Explanation
The PR adds two PowerShell functions and changes several others. Each added or changed function has a comment-based docstring, and the docstrings match the code. Added functions (Scripts/GUI/MainWindow-Localization.ps1): - Get-SupportLinkUrl has a .SYNOPSIS. It says the function returns the support destination for the active language. The code returns the Ukraine URL for ru-RU and the Ko-fi URL otherwise. This matches. - Set-SupportLinkIcon has a .SYNOPSIS and a .PARAMETER Icon. The code does nothing when Icon is null. It draws the flag for ru-RU and sets the heart glyph and clears the flag properties otherwise. The .PARAMETER text ("when present in the window") covers the null case. The synopsis matches the behaviour. Changed functions: - Update-WindowLanguageResources (MainWindow-Localization.ps1) now also calls Set-SupportLinkIcon. Its .DESCRIPTION still describes only text sync. This is a minor gap, not a contradiction. - ConvertTo-LocalizedXaml (Import-LanguageFile.ps1) now also encodes CR and LF as 
 and 
. Its docstring says the non-dynamic path "embeds XML-escaped translated text". That remains broadly true, but it does not mention the line-break encoding. This is a minor gap. - Show-AboutDialog, Show-ApplyModal, and Show-MainWindow changed only their wiring. Their docstrings (.SYNOPSIS and .PARAMETER) remain accurate. The check does not require every docstring section in the example. The docstrings present are accurate. The two minor gaps are documentation drift only, and they do not contradict current behaviour. Recommend adding the support-icon sync to the Update-WindowLanguageResources description and the CR/LF encoding to the ConvertTo-LocalizedXaml description.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 51dfa47e-d8e8-41b9-a614-538d4fef9141
Commits
Reviewing files that changed from the base of the PR and between 789a31a and 2451d6a.
Files selected for processing: 1
Config/Languages/ru-RU/Chrome.json
Files skipped from review as they are similar to previous changes: 1
Config/Languages/ru-RU/Chrome.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the support links with links to support Ukraine when using Russian language.
Summary by CodeRabbit
Get-SupportLinkUrlreturns the Ukraine support URL when the active language isru-RU. For other languages, it returns the Ko-fi URL.Set-SupportLinkIcondraws a blue-and-yellow Ukrainian flag as the support-link icon forru-RU. For other languages, it shows the support-heart glyph and clears the flag-specific size and background.Update-WindowLanguageResourcessets the support-link icon after it updates language resources.Get-SupportLinkUrlinstead of a fixed Ko-fi URL. The Apply modal keeps its error-state behavior and still opens the GitHub issue form.Config/Languages/ru-RU/Chrome.jsonchanges the support-creator label and Ko-fi link text to "Support Ukraine." The donation message asks users to support Ukraine. The default and ready completion messages mention Russia's aggression against Ukraine and link to support Ukraine.Schemas/ApplyChangesWindow.xamlnames the support-creator iconTextBlockApplyKofiIcon. Its appearance does not change.Schemas/MainWindow.xamlplaces theKofiBtnicon in a namedTextBlockinstead of the buttonContent. The tooltip, accessibility name, font size, style, and hit testing do not change.ConvertTo-LocalizedXamlencodes carriage returns and line feeds as
and
after XML escaping.ConvertTo-LocalizedXamltest checks that text with an ampersand and a blank-line paragraph break survives XML attribute parsing with LF and CRLF line endings.Get-SupportLinkUrl()andSet-SupportLinkIcon(Icon), both inScripts/GUI/MainWindow-Localization.ps1.